﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace InversPong.Model
{
    public class MovableObject : Object, IMovable
    {
        public Vector2 Velocity { get; set; }

        public int Speed { get; set; }

        public MovableObject(Vector2 position, Vector2 velocity, String gfxName, int width, int height)
            : base(position, gfxName, width, height)
        {
            Velocity = velocity;
            Speed = 1;
        }

        public Vector2 GetNextPosition()
        {
            return Position + Speed * Velocity;
        }

        public void Move()
        {
            Position = GetNextPosition();
        }
    }
}
